package matossian.j2se6.examples.variables.iteracion;

public class ContinueYBreak {

	public static void main(String [] lol) {
		breakTests();
//		continueTests();
	}
	
	public static void breakTests() {
		int i = 1; 
		outer: do {
			int j = 1;
			do {
				System.out.println("i: " + i + ", j: " + j);
				if(j == 2) {
//					break;
					break outer;
				}
				j++;
			} while (j <= 3);
			i++;
		} while (i <= 5);
	}
	
	public static void continueTests() {
		int i = 1; 
		test: do {
			int j = 1;
			do {
				System.out.println("i: " + i + ", j: " + j);
				if(j == 2) {
					continue;
//					continue test;
				}
				j++;
			} while (j <= 3);
			i++;
		} while (i <= 5);
	}
}
